package com.adingxiong.cft.design.abstractfactory;

/**
 * @ClassName ColorFactory
 * @Description TODO
 * @Author xiongchao
 * @Date 2021/1/7 15:25
 **/
public class ColorFactory extends AbstractFactory {
    @Override
    Color getColor(String color) {
        if("red".equalsIgnoreCase(color)){
            return new Red();
        }else if ("yellow".equalsIgnoreCase(color)){
            return new Yellow();
        } else if ("blue".equalsIgnoreCase(color)) {
            return new Blue();
        } else {
            return null;
        }
    }

    @Override
    Shape getShape(String shape) {
        return null;
    }
}
